home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD Collection CD 1
/
PD Collection CD 1.iso
/
programer2
/
euclidlib
/
!Example
/
!Help
< prev
next >
Wrap
Text File
|
1992-04-21
|
5KB
|
118 lines
!Example by Paul Field
See !ReadMe for distribution/modification restrictions
This program 'example' is provided as an example of how to use the euclid
library. It 'plots' and displays various functions in various ways -
most of which are under user control from menus.
There are two environmental variables that are set in !Run.
'Example$Seperatecaches' determines whether each picture has a seperate drawing
cache or not. If it is 'no' then all of the graphs will share a single drawing
cache and so if several graphs want to draw at the same time they will do so
sequentially. If is not a good idea to set this to 'no' if you are raytracing
a picture.
The cache size is determined by the environmental variable 'Example$Cachesize'.
You should probably increase this if you want to ray trace.
Known bugs:
The palette is not defined properly when drawing sprites, so in some cases
sprites will be drawn with strange colours.
Drawing 256-colour sprites should always work.
Drawing n-colour sprites in n-colour modes should always work.
Otherwise expect problems.
The icon bar menu
=================
Info gives information about the program.
Graph1 }
Graph2 } opens a window onto a particular graph (open graphs become ticked)
Graph3 }
Quit leaves the program
The graph menu (Click 'menu' over a graph window)
==============
Save Leads to the 'Save menu', from here you can save either a
Euclid file or a sprite file of the graph. You need to have enabled
'sprite mode' and the sprite must be drawn before you can save the
sprite (the sprite option will be faded until this is so).
Style Leads to the 'Style' menu. From here you can select the style of the
picture. See the section at the end on 'ray tracing' if you wish to
use that option.
Sprite Clicking here toggles 'sprite mode'. In sprite mode the euclid picture
is drawn into a sprite (if there is enough memory). This makes
redrawing the picture very fast. Try dragging another window across
the graph when it is in sprite mode and when it isn't.
This option has a sub-menu that determines various features of the
sprite and the way it is drawn (see 'Sprite Menu' below).
If there isn't enough memory when you enable sprite mode then
'Sprite' will still be ticked but the window will be redrawn
in the usual way. However, if memory becomes available later
the window will grab it and start using a sprite.
Rotate Causes the graph to start/stop rotating around the vertical axis
The sprite menu
===============
Multitask Leads to a 'multitask' menu.
Euclid pictures take time to draw and usually hold the computer
up while they are being generated. However, there are three
'multitask' modes available that split the drawing process into
sections when 'sprite mode' is enabled.
'Slow' draws very small sections at a time.
'Fast' draws fairly large sections at a time.
'VFast' draws very large sections at a time.
The 'None' option disables multitasking.
You can only see the effect of multitasking when the sprite is
being drawn. This can be forced to happen by changing the
mode of the sprite (see the next option) or by closing and then
reopening the graph.
Mode Leads to the 'mode' menu.
This simply defines the mode of the sprite. Type in the mode
that you want into the writable icon at the bottom of the menu.
There are two special options :
'Current' simply selects the current mode.
'Dynamic' makes the picture keep track with the current mode.
This means that if you start in mode 12 and select
'dynamic' (with sprite mode enabled) you will get a mode
12 sprite. If you then change to mode 15 the sprite will
be redrawn as a mode 15 sprite.
Ray tracing
===========
The ray tracing style is only active under the following circumstances :
i) Sprite mode is enabled (and the window is actually using a sprite).
ii) The sprite's mode is not 'dynamic'
iii) Multitasking is enabled
iv) The graph is not rotating
These restrictions are only there to protect you and the multitasking sprite.
You should also choose a 256-colour to ray trace in, pictures in less colours
come out rather poorly.
Notice that once the raytracing style is selected the mode 'Dynamic'
and the multitasking 'None' options will be shaded as well as 'Rotate'.
Usually when you close the window the sprite is removed and redrawn when the
window is opened. However, raytraced sprites remain attached to the window
and drawing continues even though the window is closed.
If you have any comments or queries contact :
Paul Field
3, Little Heath
Chadwell Heath
Romford
Essex
RM6 4XX
email: paulf@dcs.qmw.ac.uk (Until the end of 1994)